﻿<Window x:Class="Net.Chirash.Twitter.TweetZone.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wc="clr-namespace:Net.Chirash.Twitter.TweetZone.WindowComponents"
        xmlns:tz="clr-namespace:Net.Chirash.Twitter.TweetZone"
        Title="Tweet Zone" Height="700" Width="1020" Loaded="Window_Loaded" Icon="/TweetZone;component/Images/TweetZoneIcon.ico" Style="{DynamicResource MainWindowStyle}">
    <DockPanel>
        <Expander DockPanel.Dock="Top" 
                Header="Tweet" Name="FormExpander" MouseEnter="FormExpander_MouseEnter" MouseLeave="FormExpander_MouseLeave">
            
            <wc:UpdateForm UpdateCancellationPending="UpdateForm_UpdateCancellationPending" x:Name="MainUpdateForm" />
        </Expander>
            
        <StatusBar DockPanel.Dock="Bottom"  Name="MainStatusBar"  >
            <StatusBarItem>
                <TextBlock x:Name="StatusTextBlock" Text="Show Application Status like Loading Now" />
            </StatusBarItem>
            <StatusBarItem>
                <ProgressBar Height="10" HorizontalAlignment="Left" x:Name="ConnectionProgressBar" VerticalAlignment="Top" Width="100" 
                             Minimum="0"
                             Maximum="{Binding Source={StaticResource TimerSynchronizer}, Path=TobeRefreshedTask, Mode=OneWay}" 
                             Value="{Binding Source={StaticResource TimerSynchronizer}, Path=RefreshedTask, Mode=OneWay}" 
                             >
                </ProgressBar>
            </StatusBarItem>
            <StatusBarItem HorizontalAlignment="Right">
                <StackPanel Orientation="Horizontal">
                    <Button Name="FriendSearchButton" Click="FriendSearchButton_Click" Content="Friend Search"/>
                    <ComboBox Name="ZoneComboBox" SelectionChanged="ZoneComboBox_SelectionChanged">
                        <ComboBoxItem Name="DefaultZoneItem" Content="Default Zone" />
                        <ComboBoxItem Name="AnalysisZoneItem" Content="Analysis Zone" />
                        <ComboBoxItem Name="VariousZoneItem" Content="Various Zone" />
                    </ComboBox>
                    <wc:RateLimitPresenter x:Name="RateLimitPresentItem" Width="60" />
                    <Button Name="ProfileMyselfSbutton" Click="ProfileMyselfSbutton_Click" Height="{Binding ElementName=OpenSettingsButton, Path=ActualHeight}" >
                        <Image x:Name="MyProfileImage"  Stretch="UniformToFill"/>
                    </Button>
                    <Button x:Name="OpenSettingsButton" ToolTip="設定を開く" Click="OpenSettingsButton_Click">
                        <Image Source="Images/TweetZoneIcon.ico" Stretch="None"/>
                    </Button>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
            
        <!-- DockPanelでCenterの要素は最後に書いてください -->
         <wc:ZonePanel x:Name="ZonePanel1" ScrollViewer.VerticalScrollBarVisibility="Disabled" />
      
    </DockPanel>        
</Window>
